#
# Warning: you may need more libraries than are included here on the
# build line.  The agent frequently needs various libraries in order
# to compile pieces of it, but is OS dependent and we can't list all
# the combinations here.  Instead, look at the libraries that were
# used when linking the snmpd master agent and copy those to this
# file.
#

CC=mips-linux-gcc

OBJS=common.o ApCfg.o list.o  main.o Ap/Ap.o Ap/Common.o Ap/WlanBasic.o Ap/WlanClientList.o Ap/WlanAdvance.o Ap/SystemManage.o Ap/WorkMode.o Ap/Lan.o Ap/WlanSecurity.o
TARGETS=ApSubAgent

CFLAGS=-I. -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -I. -I/opt/mipsroot/include
BUILDAGENTLIBS=-L/opt/mipsroot/lib ApApi/libCommonInterface.a -lnetsnmpmibs -ldl -lnetsnmpagent -lnetsnmp -lrt -lm -lpthread 

all: $(TARGETS) GetSnmpTrust

GetSnmpTrust:GetSnmpTrust.o
	$(CC) -o GetSnmpTrust GetSnmpTrust.o ApApi/libCommonInterface.a 
GetSnmpTrust.o: GetSnmpTrust.c
	$(CC) -o GetSnmpTrust.o -c GetSnmpTrust.c

$(TARGETS): $(OBJS)
	$(CC) -o $(TARGETS) $(OBJS)  $(BUILDAGENTLIBS) -static
clean:
	rm $(OBJS) $(TARGETS) GetSnmpTrust GetSnmpTrust.o  -f
